fix(python-sdks): v4 API migration for integration packages - #1434
Conversation
|
Claude finished @Dhravya's task in 1m 54s —— View job Review Complete
Result: No issues found. The v4 API migration is well-implemented with proper handling of hybrid search responses, deprecation warnings for removed parameters, and robust storage queue logic. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | c262cc9 | Sep 01 2026, 06:17 AM |
2b9934b to
c449b2f
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | c262cc9 | Commit Preview URL Branch Preview URL |
Sep 01 2026, 06:20 AM |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c449b2f. Configure here.
| chunk_threshold=0.6, | ||
| include_full_docs=include_full_docs, | ||
| threshold=0.6, | ||
| search_mode="hybrid", |
There was a problem hiding this comment.
include_full_docs ignored
Medium Severity
The v4 migration stops passing include_full_docs to search.memories, but the tool still exposes that parameter with a default of True. Callers or agents that set include_full_docs=False get the same hybrid search as when it is True, so documented tool behavior no longer matches runtime.
Reviewed by Cursor Bugbot for commit c449b2f. Configure here.
| # Stainless SDK returns pydantic models (attribute access, snake_case). | ||
| memory = getattr(item, "memory", None) | ||
| if isinstance(memory, str): | ||
| trimmed = memory.strip() |
There was a problem hiding this comment.
Dedupe drops chunk-only hits
Medium Severity
extract_memory_text only reads the memory field on dicts and SDK models. Hybrid v4 results that populate chunk or content instead (as cartesia/pipecat handle in this PR) are treated as empty and dropped from deduplicated search output used by middleware and context providers.
Reviewed by Cursor Bugbot for commit c449b2f. Configure here.
ce503a4 to
c449b2f
Compare
There was a problem hiding this comment.
Overview: Migrates agent-framework, cartesia, and pipecat Python SDKs to the v4 Supermemory API, switching from search.execute to search.memories with hybrid search, updating memory storage to use client.add, and hardening deduplication to handle v4's chunk/content response fields.
Issues found: None — this looks good to ship.
The two issues flagged by Cursor Bugbot have been addressed in subsequent commits:
-
include_full_docsignored ✅ Fixed — The parameter is nowOptional[bool] = Nonewith a deprecation warning, and the model-facing tool (_search_memories_tool) properly omits it. The README documents the deprecation. -
Dedupe drops chunk-only hits ✅ Fixed — All three packages now check
("memory", "chunk", "content")fields when extracting text from v4 search results.
Notable improvements in this PR:
- Consistent
_field()helper across cartesia/pipecat for reading dict or pydantic model fields - Date-prefix normalization in deduplication prevents false duplicates between profile and search results
- Pipecat storage queue with retry-on-failure and proper cleanup drain
- Cartesia per-turn context injection with legacy fallback for older Line versions
Score: 9/10
Minor observation: The unbounded storage queue in pipecat could grow during sustained API failures, but this is a reasonable tradeoff to avoid data loss.
There was a problem hiding this comment.
Overview: Migrates agent-framework, cartesia, and pipecat Python SDKs to the v4 Supermemory API, switching from search.execute to search.memories with hybrid search, updating memory storage to use client.add, and hardening deduplication to handle v4's chunk/content response fields.
Issues found: None — this looks good to ship.
The two issues flagged by Cursor Bugbot have been addressed in subsequent commits:
-
include_full_docsignored ✅ Fixed — The parameter is nowOptional[bool] = Nonewith a deprecation warning attools.py:97-103, and the model-facing tool (_search_memories_toolat line 212) properly omits it. The README documents the deprecation. -
Dedupe drops chunk-only hits ✅ Fixed — All three packages now check
("memory", "chunk", "content")fields when extracting text from v4 search results (e.g.,utils.py:100-109in agent-framework).
Notable improvements in this PR:
- Consistent
_field()helper across cartesia/pipecat for reading dict or pydantic model fields - Date-prefix normalization in deduplication prevents false duplicates between profile and search results
- Pipecat storage queue with retry-on-failure and proper cleanup drain via
_drain_storage_queue() - Cartesia per-turn context injection with legacy fallback for older Line versions via
_agent_accepts_context() - OpenAI middleware now properly threads sync
client.addcalls and adds timeout/redirect handling
Score: 9/10
Minor observation: The unbounded storage queue in pipecat (_storage_queue: deque) could grow during sustained API failures, but this is a reasonable tradeoff to avoid data loss. The _drain_storage_queue() method provides graceful cleanup at teardown.
There was a problem hiding this comment.
Overview: Migrates agent-framework, cartesia, and pipecat Python SDKs to the v4 Supermemory API, switching from search.execute to search.memories with hybrid search, updating memory storage to use client.add, and hardening deduplication to handle v4's chunk/content response fields.
Issues found: None — this looks good to ship.
The two issues flagged by Cursor Bugbot have been addressed in subsequent commits:
-
include_full_docsignored ✅ Fixed — The parameter is nowOptional[bool] = Nonewith a deprecation warning attools.py:97-103, and the model-facing tool (_search_memories_toolat line 212) properly omits it. The README documents the deprecation. -
Dedupe drops chunk-only hits ✅ Fixed — All three packages now check
("memory", "chunk", "content")fields when extracting text from v4 search results (e.g.,utils.py:100-109in agent-framework, cartesia's_field()helper atutils.py:50-67, pipecat's equivalent atutils.py:57-73).
Notable improvements:
- Consistent
_field()helper across cartesia/pipecat for reading dict or pydantic model fields - Date-prefix normalization in deduplication prevents false duplicates between profile and search results
- Pipecat storage queue with retry-on-failure and proper cleanup drain via
_drain_storage_queue() - Cartesia per-turn context injection with legacy fallback for older Line versions via
_agent_accepts_context() - OpenAI middleware properly threads sync
client.addcalls viaasyncio.to_threadand adds timeout/redirect handling - CI workflows pinned to commit SHAs and test against minimum/current dependency versions
Score: 9/10
Minor observation: The unbounded storage queue in pipecat (_storage_queue: deque) could grow during sustained API failures, but this is a reasonable tradeoff to avoid data loss and the _drain_storage_queue() method provides graceful cleanup at teardown.
Merge activity
|
5462e20 to
96354fa
Compare
dbafb2d to
35e20d9
Compare
There was a problem hiding this comment.
Overview: Migrates agent-framework, cartesia, and pipecat Python SDKs to the v4 Supermemory API, switching from search.execute to search.memories with hybrid search, updating memory storage to use client.add, and hardening deduplication to handle v4's chunk/content response fields.
Issues found: None — this looks good to ship.
The two issues flagged by Cursor Bugbot have been addressed:
-
include_full_docsignored ✅ Fixed — The parameter is nowOptional[bool] = Nonewith a deprecation warning attools.py:97-103, and the model-facing tool (_search_memories_tool) properly omits it from the tool schema. -
Dedupe drops chunk-only hits ✅ Fixed — All three packages now check
("memory", "chunk", "content")fields when extracting text from v4 search results.
Notable improvements:
- Consistent
_field()helper across cartesia/pipecat for reading dict or pydantic model fields - Date-prefix normalization in deduplication prevents false duplicates between profile and search results
- Pipecat storage queue with retry-on-failure and proper cleanup via
_drain_storage_queue() - Cartesia per-turn context injection with legacy fallback for older Line versions via
_agent_accepts_context() - OpenAI middleware properly threads sync
client.addcalls viaasyncio.to_threadand adds timeout/redirect handling - CI workflows pinned to commit SHAs and test against minimum/current dependency versions
Score: 9/10
Minor observation: The unbounded storage queue in pipecat (_storage_queue: deque) could grow during sustained API failures, but this is a reasonable tradeoff to avoid data loss, and the _drain_storage_queue() method provides graceful cleanup at teardown.
35e20d9 to
46d1b53
Compare
## Summary - **agent-framework**: proactive search tool descriptions - **cartesia / pipecat**: v4 `client.add` + hybrid search, dedupe fixes, tests Stacked on #1433 ## Test plan - [ ] pytest in agent-framework, cartesia, pipecat packages Made with [Cursor](https://cursor.com)
96354fa to
6462215
Compare
## Summary - Update `SKILL.md` with proactive search and full 7-tool surface - Refresh `sdk-guide.md` with v4 API examples and tool descriptions Stacked on #1434 ## Test plan - [ ] Review skill content for accuracy Made with [Cursor](https://cursor.com)
The base branch was changed.
## Summary - **agent-framework**: proactive search tool descriptions - **cartesia / pipecat**: v4 `client.add` + hybrid search, dedupe fixes, tests Stacked on #1433 ## Test plan - [ ] pytest in agent-framework, cartesia, pipecat packages Made with [Cursor](https://cursor.com)
6462215 to
c262cc9
Compare
## Summary - Update `SKILL.md` with proactive search and full 7-tool surface - Refresh `sdk-guide.md` with v4 API examples and tool descriptions Stacked on #1434 ## Test plan - [ ] Review skill content for accuracy Made with [Cursor](https://cursor.com)
|
Note Production impact unlikely. No production resources are plausibly affected by this change. Dependency changes
Polylane analysed |



Summary
client.add+ hybrid search, dedupe fixes, testsStacked on #1433
Test plan
Made with Cursor